import axios from '../plugin/axios/axios'

//登录请求
export const login = (data) => {
  return axios({
      url: '/api/v1/auth/login',
      method: 'POST',
      data,
  },false)
}
export const logout = () => {
  return axios({
      url: '/api/v1/auth/logout',
      method: 'POST',
  },true)
}
//获取用户
export const user = (id) => {
  return axios({
      url: `/api/v1/user/${id}`,
      method: 'GET',
  },true)
}
export default {
  login,
  logout,
  user
}